﻿<!--{inc(header.view.html)}-->

<div class="content" id="content">
	<div class="top-menu-box">
    	<div class="z">
            <span class="z-f"><a href="#">用户数据</a>&nbsp;&gt;</span>
            <span class="z-f"><a href="#">权限列表</a></span>
            <div class="z-f-r"><span class="user-t">当前语言为：</span><span class="user-info"><?php echo $GLOBALS['langdata'][$GLOBALS['langtype']] ;?></span><!-- <a href="#">退出</a> --></div>
        </div>
        <div class="top-menu">
        	<ul>
                                                 <li><a href="index.php?app=role&act=index"  target="mainframe">用户组列表</a></li>	
                                                 <li><a href="index.php?app=role&act=add"  target="mainframe">新增用户组</a></li>				
            	<li class="current"><a href="#">权限列表</a></li>                                  
			
            </ul>
            <div class="clear"></div>
        </div>
    </div>
    
    <div class="main">
	
	
                                    <form name="form_work" method="post" action="?app=role&act=powerpost">
    <table  class="data" >
        <thead>
		
	<th>权限组名称</th>
	<th>权限内容</th>
		
        </thead>
	    <tbody>
                                     <tr>
	                                       <td  colspan="2" >当前用户组:&nbsp;&nbsp;{$rolename}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;文件包:&nbsp;&nbsp;{$pname}</td>

                                     </tr>
                                     
                                     
                                  
                                     
                                  <?php foreach((array)$powerdata as $_key => $_value ) { ?>

                                     <tr >
			                               <td align="center" >{$_value.name}</td>
									       <td valign="middle" style=" vertical-align:middle">
                                           <?php foreach((array)$_value.act as $_key1 => $_value1 ) { ?>
                                           <?php if (!isset($_value.catid)) { $_value.catid='0'; } ?>
                                           
                                           <input type="checkbox" name="power[]" value="{$_value.app}|{$_key1}|{$_value.catid}"<?php if (powercheck($_value.app , $_key1 ,$pname , $_value.catid )) { ?> checked="checked"<?php } ?>>&nbsp;{$_value1} &nbsp;

                                           <?php } ?> 
                                           </td>
                                    </tr>
                                    
                                <?php } ?>
                                     
                                    <tr>
	                                       <td align="center" colspan="2"> <a href="javascript:" onClick="CheckAll('all')">全选</a>/<a href="javascript:" onClick='CheckAll()'>反选</a>&nbsp;&nbsp;<input type="hidden" name="v" value="{$pname}" /><input type="hidden" name="id" value="{$powerid}" /><input type="submit" value=" 提 交 " class="buton"></td>

                                   </tr>
	    </tbody>
    </table>
                                   </form>	
	
	
<SCRIPT LANGUAGE="JavaScript">
<!--
function postdo(va){
	document.form_work.jobs.value=va
	document.form_work.submit();
}
function CheckAll(va){
	form=document.form_work
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(va=='all'){
			e.checked = true;
		}else{
			e.checked == true ? e.checked = false : e.checked = true;
		}
	}
}
//-->
</SCRIPT>   	
	
	
	         
        <div class="notic"><img  src="{$web_view_dir}style/images/light.gif" align="absmiddle" /> <b>提示: </b>
                                                                  <span ></span></div>
    </div>
</div>
<!--{inc(footer.view.html)}-->